package org.comple.erp.pojo.procurement;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName procurement
 */
@Getter
@Setter
@EqualsAndHashCode
@ContentRowHeight(15)
@HeadRowHeight(20)
@ColumnWidth(25)
public class Procurement implements Serializable {
    /**
     * 
     */
    @ExcelIgnore
    private String procurement_id;

    /**
     * 
     */
    @DateTimeFormat("yyyy年MM月dd日")
    @ColumnWidth(50)
    @ExcelProperty("单据日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date procurement_date;

    /**
     * 
     */
    @ExcelProperty("单据编号")
    private String procurement_code;

    /**
     * 
     */
    @ExcelProperty("供应商编号")
    private String supplier_code;

    @ExcelIgnore
    private String supplier_id;

    /**
     * 
     */
    @ExcelProperty("供应商名称")
    private String supplier_name;

    /**
     * 
     */
    @ExcelProperty("类型")
    private String supplier_type;

    /**
     * 
     */
    @ExcelIgnore
    private String buyer;


    /**
     *
     */
    @ExcelProperty("地址")
    private String procurement_address;



    /**
     * 
     */
    @ExcelProperty("关联采购退货单号")
    private String procurementRefund_code;

    /**
     * 
     */
    @ExcelProperty("关联采购订单号")
    private String procurementOrder_code;

    /**
     * 
     */
    @ExcelProperty("采购数量")
    private Integer procurement_quantity;

    /**
     * 
     */
    @ExcelProperty("金额")
    private BigDecimal buy_amount;

    /**
     * 
     */
    @ExcelProperty("折扣额")
    private BigDecimal discount_amount;

    /**
     * 
     */
    @ExcelProperty("折后金额")
    private BigDecimal afterDiscount_amount;

    /**
     * 
     */
    @ExcelProperty("税额")
    private BigDecimal tax_amount;

    /**
     * 
     */
    @ExcelProperty("本次支付账户")
    private String payment_account;

    /**
     * 
     */
    @ExcelProperty("本次支付金额")
    private BigDecimal pay_amount;

    /**
     * 
     */
    @ColumnWidth(60)
    @ExcelProperty("支付状态 0-未支付 1-部分支付 2-全部支付")
    private String pay_status;

    /**
     * 
     */
    @ColumnWidth(60)
    @ExcelProperty("退款状态 0-未退款 1-部分退款 2-全部退款")
    private String refund_status;

    /**
     * 
     */
    @ColumnWidth(50)
    @ExcelProperty("核对状态 0-未核对 1-已核对")
    private String matching_status;

    /**
     * 
     */
    @ColumnWidth(70)
    @ExcelProperty("单据状态 0-已保存 1-待审核 2-已审核 3-已驳回")
    private String checked_status;

    /**
     * 
     */
    @ExcelProperty("业务员")
    private String created_by;


    @ExcelIgnore
    private String created_id;
    /**
     * 
     */
    @DateTimeFormat("yyyy年MM月dd日")
    @ColumnWidth(50)
    @ExcelProperty("制单时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date created_date;

    /**
     * 
     */
    @ExcelProperty("价税合计")
    private BigDecimal procurement_amount;

    /**
     * 
     */
    @ColumnWidth(50)
    @ExcelProperty("是否退货 0-未退货 1-退货")
    private Integer isRefund;


    @ExcelIgnore
    private Integer isCanRefund;
    /**
     * 
     */
    @ExcelProperty("审核人")
    private String checked_by;

    /**
     * 
     */
    @ExcelProperty("备注")
    private String procurement_remark;

    /**
     * 
     */
    @ExcelProperty("支付方式")
    private String delivery_method;

    /**
     * 
     */
    @ExcelProperty("打印次数")
    private Integer printf_num;

    /**
     * 
     */
    @ColumnWidth(50)
    @ExcelProperty("是否删除 0-未删除 1-已删除")
    private Integer isDelete;

    @ExcelProperty("公司编号")
    private String companyCode;

    /**
     * 已核销金额
     */
    @ExcelProperty("已核销金额")
    private BigDecimal written_off_amount;
    /**
     * 本次核销金额
     */
    @ExcelProperty("本次核销金额")
    private BigDecimal current_written_off_amount;

    @ExcelIgnore
    private Date audit_date;



    @ExcelIgnore
        private List<ProcurementDetails> detailList;



    // 明细字段（扁平化后的字段）
    @ExcelIgnore
    private Integer procurementDetail_id;
    @ExcelProperty("商品id")
    private String goods_id;
    @ExcelProperty("商品编号")
    private String goods_code;
    @ExcelProperty("商品名称")
    private String goods_name;
    @ExcelProperty("品牌")
    private String goods_brand;
    @ExcelProperty("属性")
    private String goods_specifiction;
    @ExcelProperty("商品备注")
    private String goods_remark;
    @ExcelProperty("单位")
    private String goods_moreUint;
    @ExcelProperty("仓库")
    private String goods_store;
    @ExcelProperty("可用库存")
    private Integer moreUnit_num;
    @ExcelProperty("检测数量")
    private Integer inspected_quantity;
    @ExcelProperty("基本单位")
    private String goods_unit;
    @ExcelProperty("基本数量")
    private Integer unit_num;
    @ExcelProperty("采购单价")
    private BigDecimal goods_price;
    @ExcelProperty("数量（明细）")
    private Integer procurementDetail_num;
    @ExcelIgnore
    private BigDecimal sale_price;
    @ExcelIgnore
    private BigDecimal wholeSale_price;
    @ColumnWidth(50)
    @ExcelProperty("是否赠品 0-否 1-是")
    private Boolean gift;
    @ExcelProperty("含税单价")
    private BigDecimal afterDiscount_price;
    @ExcelIgnore
    private BigDecimal taxPrice;
    @ExcelProperty("折后含税单价")
    private BigDecimal afterDiscount_taxPrice;
    @ExcelProperty("折扣率（%）")
    private Integer discount;
    @ExcelProperty("折后单价")
    private BigDecimal discount_price;
    @ExcelProperty("折扣额（明细）")
    private BigDecimal detail_discount_amount;
    @ExcelProperty("金额（明细）")
    private BigDecimal amount;
    @ExcelProperty("税率（%）")
    private Integer tax;
    @ExcelProperty("税额（明细）")
    private BigDecimal detail_tax_amount;
    @ExcelProperty("价税合计（明细）")
    private BigDecimal totalAmount_includingTax;
    @ExcelProperty("采购金额")
    private BigDecimal procurementDetail_amount;
    @ExcelProperty("关联采购订单号")
    private String procurementDetailOrder_code;
    @ExcelProperty("备注（明细）")
    private String procurementDetail_remark;


    private static final long serialVersionUID = 1L;

    /**
     * 
     */

    public String getProcurement_id() {
        return procurement_id;
    }

    public void setProcurement_id(String procurement_id) {
        this.procurement_id = procurement_id;
    }

    /**
     * 
     */
    public Date getProcurement_date() {
        return procurement_date;
    }

    public void setProcurement_date(Date procurement_date) {
        this.procurement_date = procurement_date;
    }

    public String getProcurement_code() {
        return procurement_code;
    }

    public void setProcurement_code(String procurement_code) {
        this.procurement_code = procurement_code;
    }

    /**
     * 
     */
    public String getSupplier_code() {
        return supplier_code;
    }

    /**
     * 
     */
    public void setSupplier_code(String supplier_code) {
        this.supplier_code = supplier_code;
    }

    public String getSupplier_id() {
        return supplier_id;
    }

    public void setSupplier_id(String supplier_id) {
        this.supplier_id = supplier_id;
    }

    public Date getAudit_date() {
        return audit_date;
    }

    public void setAudit_date(Date audit_date) {
        this.audit_date = audit_date;
    }

    /**
     * 
     */
    public String getSupplier_name() {
        return supplier_name;
    }

    /**
     * 
     */
    public void setSupplier_name(String supplier_name) {
        this.supplier_name = supplier_name;
    }

    /**
     * 
     */
    public String getSupplier_type() {
        return supplier_type;
    }

    public String getCreated_id() {
        return created_id;
    }

    public void setCreated_id(String created_id) {
        this.created_id = created_id;
    }

    /**
     * 
     */
    public void setSupplier_type(String supplier_type) {
        this.supplier_type = supplier_type;
    }

    /**
     * 
     */
    public String getBuyer() {
        return buyer;
    }

    /**
     * 
     */
    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    /**
     * 
     */
    public String getProcurementRefund_code() {
        return procurementRefund_code;
    }

    /**
     * 
     */
    public void setProcurementRefund_code(String procurementRefund_code) {
        this.procurementRefund_code = procurementRefund_code;
    }

    /**
     * 
     */
    public String getProcurementOrder_code() {
        return procurementOrder_code;
    }

    /**
     * 
     */
    public void setProcurementOrder_code(String procurementOrder_code) {
        this.procurementOrder_code = procurementOrder_code;
    }

    public Integer getIsCanRefund() {
        return isCanRefund;
    }

    public void setIsCanRefund(Integer isCanRefund) {
        this.isCanRefund = isCanRefund;
    }

    public String getProcurement_address() {
        return procurement_address;
    }

    public void setProcurement_address(String procurement_address) {
        this.procurement_address = procurement_address;
    }

    /**
     * 
     */
    public Integer getProcurement_quantity() {
        return procurement_quantity;
    }

    /**
     * 
     */
    public void setProcurement_quantity(Integer procurement_quantity) {
        this.procurement_quantity = procurement_quantity;
    }

    /**
     * 
     */

    /**
     * 
     */
    public String getPayment_account() {
        return payment_account;
    }

    /**
     * 
     */
    public void setPayment_account(String payment_account) {
        this.payment_account = payment_account;
    }

    /**
     * 
     */
    public BigDecimal getPay_amount() {
        return pay_amount;
    }

    public void setPay_amount(BigDecimal pay_amount) {
        this.pay_amount = pay_amount;
    }

    /**
     * 
     */
    public String getPay_status() {
        return pay_status;
    }

    /**
     * 
     */
    public void setPay_status(String pay_status) {
        this.pay_status = pay_status;
    }

    /**
     * 
     */
    public String getRefund_status() {
        return refund_status;
    }

    /**
     * 
     */
    public void setRefund_status(String refund_status) {
        this.refund_status = refund_status;
    }

    /**
     * 
     */
    public String getMatching_status() {
        return matching_status;
    }

    /**
     * 
     */
    public void setMatching_status(String matching_status) {
        this.matching_status = matching_status;
    }

    /**
     * 
     */
    public String getChecked_status() {
        return checked_status;
    }

    /**
     * 
     */
    public void setChecked_status(String checked_status) {
        this.checked_status = checked_status;
    }

    /**
     * 
     */
    public String getCreated_by() {
        return created_by;
    }

    /**
     * 
     */
    public void setCreated_by(String created_by) {
        this.created_by = created_by;
    }

    /**
     * 
     */
    public Date getCreated_date() {
        return created_date;
    }

    /**
     * 
     */
    public void setCreated_date(Date created_date) {
        this.created_date = created_date;
    }

    /**
     * 
     */
    public BigDecimal getBuy_amount() {
        return buy_amount;
    }

    public void setBuy_amount(BigDecimal buy_amount) {
        this.buy_amount = buy_amount;
    }

    public BigDecimal getDiscount_amount() {
        return discount_amount;
    }

    public void setDiscount_amount(BigDecimal discount_amount) {
        this.discount_amount = discount_amount;
    }

    public BigDecimal getAfterDiscount_amount() {
        return afterDiscount_amount;
    }

    public void setAfterDiscount_amount(BigDecimal afterDiscount_amount) {
        this.afterDiscount_amount = afterDiscount_amount;
    }

    public BigDecimal getTax_amount() {
        return tax_amount;
    }

    public void setTax_amount(BigDecimal tax_amount) {
        this.tax_amount = tax_amount;
    }

    public BigDecimal getProcurement_amount() {
        return procurement_amount;
    }

    public void setProcurement_amount(BigDecimal procurement_amount) {
        this.procurement_amount = procurement_amount;
    }

    /**
     * 
     */
    public Integer getIsRefund() {
        return isRefund;
    }

    /**
     * 
     */
    public void setIsRefund(Integer isRefund) {
        this.isRefund = isRefund;
    }

    /**
     * 
     */
    public String getChecked_by() {
        return checked_by;
    }

    /**
     * 
     */
    public void setChecked_by(String checked_by) {
        this.checked_by = checked_by;
    }

    /**
     * 
     */
    public String getProcurement_remark() {
        return procurement_remark;
    }

    /**
     * 
     */
    public void setProcurement_remark(String procurement_remark) {
        this.procurement_remark = procurement_remark;
    }

    /**
     * 
     */
    public String getDelivery_method() {
        return delivery_method;
    }

    /**
     * 
     */
    public void setDelivery_method(String delivery_method) {
        this.delivery_method = delivery_method;
    }

    /**
     * 
     */
    public Integer getPrintf_num() {
        return printf_num;
    }

    /**
     * 
     */
    public void setPrintf_num(Integer printf_num) {
        this.printf_num = printf_num;
    }

    /**
     * 
     */
    public Integer getIsDelete() {
        return isDelete;
    }

    /**
     * 
     */
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public List<ProcurementDetails> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<ProcurementDetails> detailList) {
        this.detailList = detailList;
    }

    public Integer getProcurementDetail_id() {
        return procurementDetail_id;
    }

    public void setProcurementDetail_id(Integer procurementDetail_id) {
        this.procurementDetail_id = procurementDetail_id;
    }

    public String getGoods_code() {
        return goods_code;
    }

    public void setGoods_code(String goods_code) {
        this.goods_code = goods_code;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getGoods_brand() {
        return goods_brand;
    }

    public void setGoods_brand(String goods_brand) {
        this.goods_brand = goods_brand;
    }

    public String getGoods_specifiction() {
        return goods_specifiction;
    }

    public void setGoods_specifiction(String goods_specifiction) {
        this.goods_specifiction = goods_specifiction;
    }

    public String getGoods_remark() {
        return goods_remark;
    }

    public void setGoods_remark(String goods_remark) {
        this.goods_remark = goods_remark;
    }

    public String getGoods_moreUint() {
        return goods_moreUint;
    }

    public void setGoods_moreUint(String goods_moreUint) {
        this.goods_moreUint = goods_moreUint;
    }

    public String getGoods_store() {
        return goods_store;
    }

    public void setGoods_store(String goods_store) {
        this.goods_store = goods_store;
    }

    public Integer getMoreUnit_num() {
        return moreUnit_num;
    }

    public void setMoreUnit_num(Integer moreUnit_num) {
        this.moreUnit_num = moreUnit_num;
    }

    public Integer getInspected_quantity() {
        return inspected_quantity;
    }

    public void setInspected_quantity(Integer inspected_quantity) {
        this.inspected_quantity = inspected_quantity;
    }

    public String getGoods_unit() {
        return goods_unit;
    }

    public void setGoods_unit(String goods_unit) {
        this.goods_unit = goods_unit;
    }

    public Integer getUnit_num() {
        return unit_num;
    }

    public void setUnit_num(Integer unit_num) {
        this.unit_num = unit_num;
    }

    public BigDecimal getGoods_price() {
        return goods_price;
    }

    public void setGoods_price(BigDecimal goods_price) {
        this.goods_price = goods_price;
    }

    public BigDecimal getWholeSale_price() {
        return wholeSale_price;
    }

    public void setWholeSale_price(BigDecimal wholeSale_price) {
        this.wholeSale_price = wholeSale_price;
    }

    public BigDecimal getSale_price() {
        return sale_price;
    }

    public void setSale_price(BigDecimal sale_price) {
        this.sale_price = sale_price;
    }

    public Boolean getGift() {
        return gift;
    }

    public void setGift(Boolean gift) {
        this.gift = gift;
    }

    public BigDecimal getAfterDiscount_price() {
        return afterDiscount_price;
    }

    public void setAfterDiscount_price(BigDecimal afterDiscount_price) {
        this.afterDiscount_price = afterDiscount_price;
    }

    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    public BigDecimal getAfterDiscount_taxPrice() {
        return afterDiscount_taxPrice;
    }

    public void setAfterDiscount_taxPrice(BigDecimal afterDiscount_taxPrice) {
        this.afterDiscount_taxPrice = afterDiscount_taxPrice;
    }

    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    public BigDecimal getDiscount_price() {
        return discount_price;
    }

    public void setDiscount_price(BigDecimal discount_price) {
        this.discount_price = discount_price;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getDetail_discount_amount() {
        return detail_discount_amount;
    }

    public void setDetail_discount_amount(BigDecimal detail_discount_amount) {
        this.detail_discount_amount = detail_discount_amount;
    }

    public Integer getTax() {
        return tax;
    }

    public void setTax(Integer tax) {
        this.tax = tax;
    }

    public BigDecimal getTotalAmount_includingTax() {
        return totalAmount_includingTax;
    }

    public void setTotalAmount_includingTax(BigDecimal totalAmount_includingTax) {
        this.totalAmount_includingTax = totalAmount_includingTax;
    }

    public BigDecimal getDetail_tax_amount() {
        return detail_tax_amount;
    }

    public void setDetail_tax_amount(BigDecimal detail_tax_amount) {
        this.detail_tax_amount = detail_tax_amount;
    }

    public BigDecimal getProcurementDetail_amount() {
        return procurementDetail_amount;
    }

    public void setProcurementDetail_amount(BigDecimal procurementDetail_amount) {
        this.procurementDetail_amount = procurementDetail_amount;
    }

    public String getProcurementDetail_remark() {
        return procurementDetail_remark;
    }

    public void setProcurementDetail_remark(String procurementDetail_remark) {
        this.procurementDetail_remark = procurementDetail_remark;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public Integer getProcurementDetail_num() {
        return procurementDetail_num;
    }

    public void setProcurementDetail_num(Integer procurementDetail_num) {
        this.procurementDetail_num = procurementDetail_num;
    }

    public String getProcurementDetailOrder_code() {
        return procurementDetailOrder_code;
    }

    public void setProcurementDetailOrder_code(String procurementDetailOrder_code) {
        this.procurementDetailOrder_code = procurementDetailOrder_code;
    }

    public BigDecimal getWritten_off_amount() {
        return written_off_amount;
    }

    public void setWritten_off_amount(BigDecimal written_off_amount) {
        this.written_off_amount = written_off_amount;
    }

    public BigDecimal getCurrent_written_off_amount() {
        return current_written_off_amount;
    }

    public void setCurrent_written_off_amount(BigDecimal current_written_off_amount) {
        this.current_written_off_amount = current_written_off_amount;
    }

    public String getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(String goods_id) {
        this.goods_id = goods_id;
    }
}